// @/api/used/used.js
import request from "@/api/index.js";

export function carouselFigureApi(pagenum) {
	return request({
		url: "/carousel-figure",
		method: "get"
	});
}

// 获取二手分类名称数据
export function getUsedClassifyApi() {
	return request({
		url: "/IntactGoods/family",
		method: "get"
	})
}

// 获取商品列表
export function getSearchIntactGoodsApi(pagenum, familyId = 0, sort = '', content = '') {
	let query = `?page=${pagenum}&sort=${sort}`;
	if (content) {
		query = query + `&content=${content}`;
	}
	if (familyId) {
		query = query + `&familyId=${familyId}`;
	}
	return request({
		url: `/IntactGoods/list${query}`,
		method: "get"
	});
}